<?php
	function dbConnect(){
		return mysqli_connect('localhost','root','','querigma');
	}

	function getUser($con,$id){
		$query = "SELECT * from usuario where id = '$id'";
		$result = mysqli_query($con,$query);
		return mysqli_fetch_assoc($result);
	}

	function getUserByLogin($con,$login){
		$query = "SELECT * from usuario where login = '$login'";
		$result = mysqli_query($con,$query);
		return mysqli_fetch_assoc($result);
	}
